package com.faiz.example;

import java.util.Random;

public class ExRandom {
    private Random random = new Random(5);

    public int rand7() {
        return 1 + random.nextInt(7);
    }

    public int rand4() {
        int i = 8;
        while (i > 4) {
            i = rand7();
        }
        return i;
    }

    public int exRandom() {
        return rand7() - 1 + rand4();
    }
}
